﻿@model IEnumerable<Thread>

@RenderPage(TPath("Views/Shared/_ServerContainer.cshtml", "wow"))

@if (Model != null)
{
    <div class="homepage-news-wrapper">
        <div id="news-updates">
		    <div id="news-updates-inner">
            @{var postIndex = 0;
                foreach (var thread in Model)
                {
                    <div class="news-article @if (postIndex == 0)
                                                {
                                                    postIndex = 1; <text>first-child</text> }">
                        <div class="news-article-inner">
                            <h3>
                                <a href="@thread.ThreadUrl"> @thread.Title </a>
                            </h3>
                            <div class="by-line">
                                <a href="@thread.Category.CategoryUrl">@thread.Category.CategoryName</a>
                                <span class="spacer"></span> @thread.LastModify.ToLocalDateTimeString()
                                <a href="@thread.ThreadUrl#comments" class="comments-link">
                                    @thread.PostCount
                                </a>
                            </div>
                            <div class="article-left" style="background-image: url('@Url.Content(thread.LogoUrl)');">
                                <a href="@thread.ThreadUrl"><span class="thumb-frame"></span></a>
                            </div>
                            <div class="article-right">
                                <div class="article-summary">
                                    <p>@thread.Summary</p>
                                    <a href="@thread.ThreadUrl" class="more">@Local("ThreadsView.More")</a>
                                </div>
                            </div>
                            <span class="clear"></span>
                        </div>
                    </div>
                }
            }
            @DefaultHelpers.ShowPager((int)ViewBag.Pages)
            </div>
        </div>
    </div>
}